package org.zp.service;

import java.util.List;

import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.zp.mapper.MenuInfoMapper;
import org.zp.pojo.MenuInfo;
import org.zp.util.MyBatisUtil;
@Service
@Transactional(rollbackFor = Exception.class)//出现异常就回滚事务
public class MenuInfoServiceImpl implements MenuInfoService{
	@Resource
	private MenuInfoMapper m;
	@Override
	public List<MenuInfo> showByRoleId(Long roleId) {

		return m.selectByRoleId(roleId);
	}
	@Override
	public Integer updateMenu(Integer jid, Integer pid, Integer state) {
		// TODO Auto-generated method stub
		return m.updateMenu(jid,pid,state);
	}
	@Override
	public Integer updateMenuName(Integer jid, String name) {
		// TODO Auto-generated method stub
		return m.updateMenuName(jid,name);
	}
	@Override
	public Integer updateMenuJid(String jid) {
		// TODO Auto-generated method stub
		return m.updateMenuJid(jid);
	}
	@Override
	public Integer moveMenu(Integer moveIdd, Integer moveJuriPidd) {
		// TODO Auto-generated method stub
		return m.moveMenu(moveIdd,moveJuriPidd);
	}
	@Override
	public List<MenuInfo> showByRoleIddate(Long roleId) {
		// TODO Auto-generated method stub
		return m.showByRoleIddate(roleId);
	}

}
